/*
 *************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
 * Version 1.1  with a permitted attribution clause; you may not  use this
 * file except in compliance with the License. You  may  obtain  a copy of
 * the License at http://www.openbravo.com/legal/license.html
 * Software distributed under the License  is  distributed  on  an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific  language  governing  rights  and  limitations
 * under the License.
 * The Original Code is Openbravo ERP.
 * The Initial Developer of the Original Code is Openbravo SLU
 * All portions are Copyright (C) 2008-2014 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************
*/
package com.mes.plan.data;

import com.mes.data.EmesCustomer;
import com.mes.data.EmesPBom;
import com.mes.data.EmesProcessRoute;
import com.mes.manufacture.data.EmesoManuOrder;
import com.mes.manufacture.data.EmesoManuOrderFinished;
import com.mes.manufacture.data.EmesoOutAssistOrder;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.openbravo.base.structure.ActiveEnabled;
import org.openbravo.base.structure.BaseOBObject;
import org.openbravo.base.structure.ClientEnabled;
import org.openbravo.base.structure.OrganizationEnabled;
import org.openbravo.base.structure.Traceable;
import org.openbravo.model.ad.access.User;
import org.openbravo.model.ad.system.Client;
import org.openbravo.model.common.enterprise.Organization;
import org.openbravo.model.common.plm.Product;
import org.openbravo.model.common.uom.UOM;
/**
 * Entity class for entity Emesp_PlanOrder (stored in table Emesp_PlanOrder).
 *
 * NOTE: This class should not be instantiated directly. To instantiate this
 * class the {@link org.openbravo.base.provider.OBProvider} should be used.
 */
public class EmesPlanOrder extends BaseOBObject implements Traceable, ClientEnabled, OrganizationEnabled, ActiveEnabled {
    private static final long serialVersionUID = 1L;
    public static final String TABLE_NAME = "Emesp_PlanOrder";
    public static final String ENTITY_NAME = "Emesp_PlanOrder";
    public static final String PROPERTY_ID = "id";
    public static final String PROPERTY_EMESPDEMANDPLAN = "emespDemandplan";
    public static final String PROPERTY_ORGANIZATION = "organization";
    public static final String PROPERTY_CODE = "code";
    public static final String PROPERTY_NAME = "name";
    public static final String PROPERTY_DESCRIPTION = "description";
    public static final String PROPERTY_WORKNO = "workno";
    public static final String PROPERTY_PROJECTNO = "projectNo";
    public static final String PROPERTY_TOPPRODUCT = "topProduct";
    public static final String PROPERTY_PRODUCT = "product";
    public static final String PROPERTY_SALENO = "saleno";
    public static final String PROPERTY_EMESPROCESSROUTE = "eMESProcessRoute";
    public static final String PROPERTY_EMESPBOM = "emesPbom";
    public static final String PROPERTY_ROUTEVER = "routever";
    public static final String PROPERTY_BOMVER = "bomver";
    public static final String PROPERTY_QTY = "qty";
    public static final String PROPERTY_UOM = "uom";
    public static final String PROPERTY_PRIORTYLEVEL = "priortyLevel";
    public static final String PROPERTY_REQDATE = "reqDate";
    public static final String PROPERTY_STOPEXPAN = "stopExpan";
    public static final String PROPERTY_APPROVEPLANDATE = "approvePlandate";
    public static final String PROPERTY_APPROVEEXEDATE = "approveExedate";
    public static final String PROPERTY_APPROVEUSERID = "approveUserid";
    public static final String PROPERTY_CHECKDATE = "checkDate";
    public static final String PROPERTY_CHECKUSERID = "checkUserid";
    public static final String PROPERTY_PLANEDDATEFROM = "planedDateFrom";
    public static final String PROPERTY_PLANEDDATETO = "planedDateTo";
    public static final String PROPERTY_QTYDONE = "qtyDone";
    public static final String PROPERTY_QTYDECOMPOSE = "qtyDecompose";
    public static final String PROPERTY_EMESCUSTOMER = "emesCustomer";
    public static final String PROPERTY_STATUS = "status";
    public static final String PROPERTY_EXECUTEDATEFROM = "executeDateFrom";
    public static final String PROPERTY_EXECUTEDATETO = "executeDateTo";
    public static final String PROPERTY_PLANORDER = "planorder";
    public static final String PROPERTY_REFPLANORDER = "refPlanorder";
    public static final String PROPERTY_PAUSEDATE = "pauseDate";
    public static final String PROPERTY_BEFOREPAUSESTATUS = "beforepauseStatus";
    public static final String PROPERTY_CLIENT = "client";
    public static final String PROPERTY_ACTIVE = "active";
    public static final String PROPERTY_CREATIONDATE = "creationDate";
    public static final String PROPERTY_CREATEDBY = "createdBy";
    public static final String PROPERTY_UPDATED = "updated";
    public static final String PROPERTY_UPDATEDBY = "updatedBy";
    public static final String PROPERTY_DECOMPOSEBUT = "decomposeBut";
    public static final String PROPERTY_STATUSSETBUT = "statusSetBut";
    public static final String PROPERTY_AUDITBUT = "auditBut";
    public static final String PROPERTY_SPLITBUT = "splitBut";
    public static final String PROPERTY_ISSUEDBUT = "issuedBut";
    public static final String PROPERTY_BATCHNO = "batchNo";
    public static final String PROPERTY_VALIDATE = "validate";
    public static final String PROPERTY_IMPORTBTN = "importBtn";
    public static final String PROPERTY_EMESOMANUORDERLIST = "emesoManuOrderList";
    public static final String PROPERTY_EMESOMANUORDERFINISHEDLIST = "emesoManuOrderFinishedList";
    public static final String PROPERTY_EMESOOUTASSISTORDERLIST = "emesoOutAssistOrderList";
    public static final String PROPERTY_EMESPPLANORDERPPLANORDERIDLIST = "emespPlanOrderPPlanorderIDList";
    public static final String PROPERTY_EMESPPLANORDERREFPLANORDERIDLIST = "emespPlanOrderRefPlanorderIDList";
    public static final String PROPERTY_EMESPPLANORDERBOMITEMLIST = "emespPlanOrderBomItemList";

    public EmesPlanOrder() {
        setDefaultValue(PROPERTY_STOPEXPAN, false);
        setDefaultValue(PROPERTY_STATUS, "CREATE");
        setDefaultValue(PROPERTY_ACTIVE, true);
        setDefaultValue(PROPERTY_DECOMPOSEBUT, false);
        setDefaultValue(PROPERTY_STATUSSETBUT, false);
        setDefaultValue(PROPERTY_AUDITBUT, false);
        setDefaultValue(PROPERTY_SPLITBUT, false);
        setDefaultValue(PROPERTY_ISSUEDBUT, false);
        setDefaultValue(PROPERTY_VALIDATE, false);
        setDefaultValue(PROPERTY_IMPORTBTN, false);
        setDefaultValue(PROPERTY_EMESOMANUORDERLIST, new ArrayList<Object>());
        setDefaultValue(PROPERTY_EMESOMANUORDERFINISHEDLIST, new ArrayList<Object>());
        setDefaultValue(PROPERTY_EMESOOUTASSISTORDERLIST, new ArrayList<Object>());
        setDefaultValue(PROPERTY_EMESPPLANORDERPPLANORDERIDLIST, new ArrayList<Object>());
        setDefaultValue(PROPERTY_EMESPPLANORDERREFPLANORDERIDLIST, new ArrayList<Object>());
        setDefaultValue(PROPERTY_EMESPPLANORDERBOMITEMLIST, new ArrayList<Object>());
    }

    @Override
    public String getEntityName() {
        return ENTITY_NAME;
    }

    public String getId() {
        return (String) get(PROPERTY_ID);
    }

    public void setId(String id) {
        set(PROPERTY_ID, id);
    }

    public EmesDemandPlan getEmespDemandplan() {
        return (EmesDemandPlan) get(PROPERTY_EMESPDEMANDPLAN);
    }

    public void setEmespDemandplan(EmesDemandPlan emespDemandplan) {
        set(PROPERTY_EMESPDEMANDPLAN, emespDemandplan);
    }

    public Organization getOrganization() {
        return (Organization) get(PROPERTY_ORGANIZATION);
    }

    public void setOrganization(Organization organization) {
        set(PROPERTY_ORGANIZATION, organization);
    }

    public String getCode() {
        return (String) get(PROPERTY_CODE);
    }

    public void setCode(String code) {
        set(PROPERTY_CODE, code);
    }

    public String getName() {
        return (String) get(PROPERTY_NAME);
    }

    public void setName(String name) {
        set(PROPERTY_NAME, name);
    }

    public String getDescription() {
        return (String) get(PROPERTY_DESCRIPTION);
    }

    public void setDescription(String description) {
        set(PROPERTY_DESCRIPTION, description);
    }

    public String getWorkno() {
        return (String) get(PROPERTY_WORKNO);
    }

    public void setWorkno(String workno) {
        set(PROPERTY_WORKNO, workno);
    }

    public String getProjectNo() {
        return (String) get(PROPERTY_PROJECTNO);
    }

    public void setProjectNo(String projectNo) {
        set(PROPERTY_PROJECTNO, projectNo);
    }

    public Product getTopProduct() {
        return (Product) get(PROPERTY_TOPPRODUCT);
    }

    public void setTopProduct(Product topProduct) {
        set(PROPERTY_TOPPRODUCT, topProduct);
    }

    public Product getProduct() {
        return (Product) get(PROPERTY_PRODUCT);
    }

    public void setProduct(Product product) {
        set(PROPERTY_PRODUCT, product);
    }

    public String getSaleno() {
        return (String) get(PROPERTY_SALENO);
    }

    public void setSaleno(String saleno) {
        set(PROPERTY_SALENO, saleno);
    }

    public EmesProcessRoute getEMESProcessRoute() {
        return (EmesProcessRoute) get(PROPERTY_EMESPROCESSROUTE);
    }

    public void setEMESProcessRoute(EmesProcessRoute eMESProcessRoute) {
        set(PROPERTY_EMESPROCESSROUTE, eMESProcessRoute);
    }

    public EmesPBom getEmesPbom() {
        return (EmesPBom) get(PROPERTY_EMESPBOM);
    }

    public void setEmesPbom(EmesPBom emesPbom) {
        set(PROPERTY_EMESPBOM, emesPbom);
    }

    public String getRoutever() {
        return (String) get(PROPERTY_ROUTEVER);
    }

    public void setRoutever(String routever) {
        set(PROPERTY_ROUTEVER, routever);
    }

    public String getBomver() {
        return (String) get(PROPERTY_BOMVER);
    }

    public void setBomver(String bomver) {
        set(PROPERTY_BOMVER, bomver);
    }

    public Long getQty() {
        return (Long) get(PROPERTY_QTY);
    }

    public void setQty(Long qty) {
        set(PROPERTY_QTY, qty);
    }

    public UOM getUom() {
        return (UOM) get(PROPERTY_UOM);
    }

    public void setUom(UOM uom) {
        set(PROPERTY_UOM, uom);
    }

    public Long getPriortyLevel() {
        return (Long) get(PROPERTY_PRIORTYLEVEL);
    }

    public void setPriortyLevel(Long priortyLevel) {
        set(PROPERTY_PRIORTYLEVEL, priortyLevel);
    }

    public Date getReqDate() {
        return (Date) get(PROPERTY_REQDATE);
    }

    public void setReqDate(Date reqDate) {
        set(PROPERTY_REQDATE, reqDate);
    }

    public Boolean isStopExpan() {
        return (Boolean) get(PROPERTY_STOPEXPAN);
    }

    public void setStopExpan(Boolean stopExpan) {
        set(PROPERTY_STOPEXPAN, stopExpan);
    }

    public Date getApprovePlandate() {
        return (Date) get(PROPERTY_APPROVEPLANDATE);
    }

    public void setApprovePlandate(Date approvePlandate) {
        set(PROPERTY_APPROVEPLANDATE, approvePlandate);
    }

    public Date getApproveExedate() {
        return (Date) get(PROPERTY_APPROVEEXEDATE);
    }

    public void setApproveExedate(Date approveExedate) {
        set(PROPERTY_APPROVEEXEDATE, approveExedate);
    }

    public User getApproveUserid() {
        return (User) get(PROPERTY_APPROVEUSERID);
    }

    public void setApproveUserid(User approveUserid) {
        set(PROPERTY_APPROVEUSERID, approveUserid);
    }

    public Date getCheckDate() {
        return (Date) get(PROPERTY_CHECKDATE);
    }

    public void setCheckDate(Date checkDate) {
        set(PROPERTY_CHECKDATE, checkDate);
    }

    public User getCheckUserid() {
        return (User) get(PROPERTY_CHECKUSERID);
    }

    public void setCheckUserid(User checkUserid) {
        set(PROPERTY_CHECKUSERID, checkUserid);
    }

    public Date getPlanedDateFrom() {
        return (Date) get(PROPERTY_PLANEDDATEFROM);
    }

    public void setPlanedDateFrom(Date planedDateFrom) {
        set(PROPERTY_PLANEDDATEFROM, planedDateFrom);
    }

    public Date getPlanedDateTo() {
        return (Date) get(PROPERTY_PLANEDDATETO);
    }

    public void setPlanedDateTo(Date planedDateTo) {
        set(PROPERTY_PLANEDDATETO, planedDateTo);
    }

    public Long getQtyDone() {
        return (Long) get(PROPERTY_QTYDONE);
    }

    public void setQtyDone(Long qtyDone) {
        set(PROPERTY_QTYDONE, qtyDone);
    }

    public Long getQtyDecompose() {
        return (Long) get(PROPERTY_QTYDECOMPOSE);
    }

    public void setQtyDecompose(Long qtyDecompose) {
        set(PROPERTY_QTYDECOMPOSE, qtyDecompose);
    }

    public EmesCustomer getEmesCustomer() {
        return (EmesCustomer) get(PROPERTY_EMESCUSTOMER);
    }

    public void setEmesCustomer(EmesCustomer emesCustomer) {
        set(PROPERTY_EMESCUSTOMER, emesCustomer);
    }

    public String getStatus() {
        return (String) get(PROPERTY_STATUS);
    }

    public void setStatus(String status) {
        set(PROPERTY_STATUS, status);
    }

    public Date getExecuteDateFrom() {
        return (Date) get(PROPERTY_EXECUTEDATEFROM);
    }

    public void setExecuteDateFrom(Date executeDateFrom) {
        set(PROPERTY_EXECUTEDATEFROM, executeDateFrom);
    }

    public Date getExecuteDateTo() {
        return (Date) get(PROPERTY_EXECUTEDATETO);
    }

    public void setExecuteDateTo(Date executeDateTo) {
        set(PROPERTY_EXECUTEDATETO, executeDateTo);
    }

    public EmesPlanOrder getPlanorder() {
        return (EmesPlanOrder) get(PROPERTY_PLANORDER);
    }

    public void setPlanorder(EmesPlanOrder planorder) {
        set(PROPERTY_PLANORDER, planorder);
    }

    public EmesPlanOrder getRefPlanorder() {
        return (EmesPlanOrder) get(PROPERTY_REFPLANORDER);
    }

    public void setRefPlanorder(EmesPlanOrder refPlanorder) {
        set(PROPERTY_REFPLANORDER, refPlanorder);
    }

    public Date getPauseDate() {
        return (Date) get(PROPERTY_PAUSEDATE);
    }

    public void setPauseDate(Date pauseDate) {
        set(PROPERTY_PAUSEDATE, pauseDate);
    }

    public String getBeforepauseStatus() {
        return (String) get(PROPERTY_BEFOREPAUSESTATUS);
    }

    public void setBeforepauseStatus(String beforepauseStatus) {
        set(PROPERTY_BEFOREPAUSESTATUS, beforepauseStatus);
    }

    public Client getClient() {
        return (Client) get(PROPERTY_CLIENT);
    }

    public void setClient(Client client) {
        set(PROPERTY_CLIENT, client);
    }

    public Boolean isActive() {
        return (Boolean) get(PROPERTY_ACTIVE);
    }

    public void setActive(Boolean active) {
        set(PROPERTY_ACTIVE, active);
    }

    public Date getCreationDate() {
        return (Date) get(PROPERTY_CREATIONDATE);
    }

    public void setCreationDate(Date creationDate) {
        set(PROPERTY_CREATIONDATE, creationDate);
    }

    public User getCreatedBy() {
        return (User) get(PROPERTY_CREATEDBY);
    }

    public void setCreatedBy(User createdBy) {
        set(PROPERTY_CREATEDBY, createdBy);
    }

    public Date getUpdated() {
        return (Date) get(PROPERTY_UPDATED);
    }

    public void setUpdated(Date updated) {
        set(PROPERTY_UPDATED, updated);
    }

    public User getUpdatedBy() {
        return (User) get(PROPERTY_UPDATEDBY);
    }

    public void setUpdatedBy(User updatedBy) {
        set(PROPERTY_UPDATEDBY, updatedBy);
    }

    public Boolean isDecomposeBut() {
        return (Boolean) get(PROPERTY_DECOMPOSEBUT);
    }

    public void setDecomposeBut(Boolean decomposeBut) {
        set(PROPERTY_DECOMPOSEBUT, decomposeBut);
    }

    public Boolean isStatusSetBut() {
        return (Boolean) get(PROPERTY_STATUSSETBUT);
    }

    public void setStatusSetBut(Boolean statusSetBut) {
        set(PROPERTY_STATUSSETBUT, statusSetBut);
    }

    public Boolean isAuditBut() {
        return (Boolean) get(PROPERTY_AUDITBUT);
    }

    public void setAuditBut(Boolean auditBut) {
        set(PROPERTY_AUDITBUT, auditBut);
    }

    public Boolean isSplitBut() {
        return (Boolean) get(PROPERTY_SPLITBUT);
    }

    public void setSplitBut(Boolean splitBut) {
        set(PROPERTY_SPLITBUT, splitBut);
    }

    public Boolean isSuedBut() {
        return (Boolean) get(PROPERTY_ISSUEDBUT);
    }

    public void setSuedBut(Boolean issuedBut) {
        set(PROPERTY_ISSUEDBUT, issuedBut);
    }

    public String getBatchNo() {
        return (String) get(PROPERTY_BATCHNO);
    }

    public void setBatchNo(String batchNo) {
        set(PROPERTY_BATCHNO, batchNo);
    }

    public Boolean isValidate() {
        return (Boolean) get(PROPERTY_VALIDATE);
    }

    public void setValidate(Boolean validate) {
        set(PROPERTY_VALIDATE, validate);
    }

    public Boolean isImportBtn() {
        return (Boolean) get(PROPERTY_IMPORTBTN);
    }

    public void setImportBtn(Boolean importBtn) {
        set(PROPERTY_IMPORTBTN, importBtn);
    }

    @SuppressWarnings("unchecked")
    public List<EmesoManuOrder> getEmesoManuOrderList() {
      return (List<EmesoManuOrder>) get(PROPERTY_EMESOMANUORDERLIST);
    }

    public void setEmesoManuOrderList(List<EmesoManuOrder> emesoManuOrderList) {
        set(PROPERTY_EMESOMANUORDERLIST, emesoManuOrderList);
    }

    @SuppressWarnings("unchecked")
    public List<EmesoManuOrderFinished> getEmesoManuOrderFinishedList() {
      return (List<EmesoManuOrderFinished>) get(PROPERTY_EMESOMANUORDERFINISHEDLIST);
    }

    public void setEmesoManuOrderFinishedList(List<EmesoManuOrderFinished> emesoManuOrderFinishedList) {
        set(PROPERTY_EMESOMANUORDERFINISHEDLIST, emesoManuOrderFinishedList);
    }

    @SuppressWarnings("unchecked")
    public List<EmesoOutAssistOrder> getEmesoOutAssistOrderList() {
      return (List<EmesoOutAssistOrder>) get(PROPERTY_EMESOOUTASSISTORDERLIST);
    }

    public void setEmesoOutAssistOrderList(List<EmesoOutAssistOrder> emesoOutAssistOrderList) {
        set(PROPERTY_EMESOOUTASSISTORDERLIST, emesoOutAssistOrderList);
    }

    @SuppressWarnings("unchecked")
    public List<EmesPlanOrder> getEmespPlanOrderPPlanorderIDList() {
      return (List<EmesPlanOrder>) get(PROPERTY_EMESPPLANORDERPPLANORDERIDLIST);
    }

    public void setEmespPlanOrderPPlanorderIDList(List<EmesPlanOrder> emespPlanOrderPPlanorderIDList) {
        set(PROPERTY_EMESPPLANORDERPPLANORDERIDLIST, emespPlanOrderPPlanorderIDList);
    }

    @SuppressWarnings("unchecked")
    public List<EmesPlanOrder> getEmespPlanOrderRefPlanorderIDList() {
      return (List<EmesPlanOrder>) get(PROPERTY_EMESPPLANORDERREFPLANORDERIDLIST);
    }

    public void setEmespPlanOrderRefPlanorderIDList(List<EmesPlanOrder> emespPlanOrderRefPlanorderIDList) {
        set(PROPERTY_EMESPPLANORDERREFPLANORDERIDLIST, emespPlanOrderRefPlanorderIDList);
    }

    @SuppressWarnings("unchecked")
    public List<EmesPlanOrderBomItem> getEmespPlanOrderBomItemList() {
      return (List<EmesPlanOrderBomItem>) get(PROPERTY_EMESPPLANORDERBOMITEMLIST);
    }

    public void setEmespPlanOrderBomItemList(List<EmesPlanOrderBomItem> emespPlanOrderBomItemList) {
        set(PROPERTY_EMESPPLANORDERBOMITEMLIST, emespPlanOrderBomItemList);
    }

}
